package com.dmall.manager.controller;

import com.dmall.framework.result.DmallResult;
import com.dmall.search.service.SearchItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 导入商品数据到索引库
 * @author Chen 2017/10/25
 */
@Controller
public class SearchItemController {
    @Autowired
    private SearchItemService searchItemService;

    @RequestMapping("/index/item/import")
    @ResponseBody
    public DmallResult importItemList(){
        return searchItemService.importAllItems();
    }
}
